package net.homeip.jcperera.nu.core.msg;

import java.util.Hashtable;

/**
 * Actual implementation of a Error severity class Message
 * 
 * @see BaseMessage
 * @name Error Message class
 * @author julio.c.perera@gmail.com
 * @application nu
 * @since 0.1.0.0
 */

public class ErrorMessage extends BaseMessage
{
    // Required to implement Serializable interface
    private static final long  serialVersionUID = 236910035160158587L;

    // CoreBase properties, for easy use from other components, as well as logging
    public static final int    runtimeLevel     = 0;
    public static final String moduleName       = "core";
    public static final String componentName    = "nu_core_msg_error_message";

    /**
     * Constructs a ErrorMessage given the <code>code</code>, <code>friendliness</code> and <code>extensions</code>
     * specified
     * 
     * @param code
     * @param severity
     * @param friendliness
     * @param extensions
     */
    public ErrorMessage(String code, String friendliness, Hashtable<String, String> extensions)
    {
        super(code, BaseMessage.SEVERITY_ERROR, friendliness, extensions);
    }

    /**
     * Constructs a ErrorMessage given the <code>code</code> and <code>friendliness</code> specified
     * 
     * @param code
     * @param severity
     * @param friendliness
     * @param extensions
     */
    public ErrorMessage(String code, String friendliness)
    {
        super(code, BaseMessage.SEVERITY_ERROR, friendliness);
    }

    /**
     * Constructs a ErrorMessage with the <code>code</code> specified, <code>severity</code> and
     * <code>friendliness</code> at defaults
     * 
     * @param code
     */
    public ErrorMessage(String code)
    {
        super(code, BaseMessage.SEVERITY_ERROR);
    }

    /**
     * <p>
     * Constructs an empty Message.
     * </p>
     * <p>
     * Note that you should AT LEAST assign <code>code</code> manually using {@linkplain #setCode(String)}
     * </p>
     */
    public ErrorMessage()
    {
        super();
        super.setSeverity(BaseMessage.SEVERITY_ERROR);
    };
}
